<template>
    <form>
        <p><strong>用户名</strong></p>
        <input type="text" placeholder="用户名" v-model="sonUserName">
        <p><strong>评论内容</strong></p>
        <textarea placeholder="评论内容" v-model="sonComment"></textarea>
        <button @click.prevent="getUserData(sonUserName,sonComment)">提交</button>
    </form>
</template>

<script>
export default {
    name: 'CommentAdd',
    props: ['getUserData'],
    data: function(){
        return {
            sonUserName: '',
            sonComment: ''
        }
    }
}

</script>

<style>
input{
    width: 300px;
}
textarea{
    height: 100px;
    width: 300px;
}
button{
    display: block;
}
</style>